package net.xo68.destiny.manager.service;

import lombok.extern.slf4j.Slf4j;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import net.xo68.destiny.manager.entity.JobDetailExtend;
import net.xo68.destiny.manager.mapper.JobDetailExtendMapper;



/** 
 * JobDetailExtend Service
 * @author wuxie(16349023@qq.com)
 * @date 2020年12月21日 21:43:52
 *
 */
@Slf4j
@Service
public class JobDetailExtendService{
    
    @Autowired
    private JobDetailExtendMapper jobDetailExtendMapper;

    public JobDetailExtend find(String extKey) {
        return  jobDetailExtendMapper.find(extKey);
    }

    public JobDetailExtend insert(JobDetailExtend jobDetailExtend) {
        jobDetailExtendMapper.insert(jobDetailExtend);
        return jobDetailExtend;
    }

    public JobDetailExtend update(JobDetailExtend jobDetailExtend) {
        jobDetailExtendMapper.update(jobDetailExtend);
        return jobDetailExtend;
    }
    
    public int delete(String extKey) {
        return jobDetailExtendMapper.delete(extKey);
    }
    
    public List<JobDetailExtend> list() {
        return jobDetailExtendMapper.list();
    }
	
	public PageInfo<JobDetailExtend> list(int pageNumber,int pageSize) {
        PageHelper.startPage(pageNumber, pageSize,true);
        List<JobDetailExtend> docs = jobDetailExtendMapper.list();
        PageInfo<JobDetailExtend> pageInfo = new PageInfo<JobDetailExtend>(docs);
        return pageInfo;
    }
}